package thread.basepackage.t12;

/**
 * 线程优先级的随机性 越大越高
 * Created by cuihao on 2017/11/29.
 */
public class Run {
    public static void main(String[] args) {
        for (int i = 0; i < 10; i++) {
            Thread1 thread1 = new Thread1();
            thread1.setPriority(1);
            thread1.start();
            Thread2 thread2 = new Thread2();
            thread2.setPriority(10);
            thread2.start();
        }
    }
}

/*for 内部循环一次后，不管线程内部有没有结束 都会进行及二轮循环*/